|
![](/i/fill.gif) |
Chris Huff wrote in message ...
>In article <3a092503@news.povray.org>, "Wlodzimierz ABX Skiba"
><abx### [at] abx art pl> wrote:
>> unfortunately i still have 2049 in p.p and 21988 in p.g to read :-(
>> but only 6977 in p.b.i :-)
>
>You are reading all the messages in the groups? Whew...
yeap, it's good lesson
now I have 55% of whole news.povray.org in my little head ;-)
>> but this small change could make 3.5 much faster in such use
>
>It could, but POV 3.5 is feature-frozen now, so this improvement most
>likely won't make it in.
I know, I know
but it will be faster if I only implement technic from mp6 I think
I don't want waste time for looking at randering ;-)
> [interesting stuff about my previous idea]
During download of djgpp and teaching it I thought about
my previous idea with remebered results.
It is completly not necessary if thera are locals in function.
Since three days I look at sources
and yesterdey I start with coding.
I plan support such syntax:
#declare Func=function{expression_using_x_y_z}
this is for old scripts to support not changed pov-files
this is i.e. for such old calls:
Func,Func(x,y,z),Func(4*sin(x),Func(x,y+1.z+2),2^z)
#declare Func=function(name1,name2,name3,name4)
#declare Func=function(name1,name2,name3=value,name4=value)
this is for extended new syntax - you can pass as many parameters
as you want with default values or not
first parameters with no defaults, than with defaults
it is possible to put all with defaults and all without
possible calls depends of how many defaults is declared, i.e.:
Func(x,y,z)
- possible: Func(4*x,y+7,z+8), Func(Func(x,y,z),Func(x,x,x),0)
- impossible: Func, Func(x,y), Func(x,y,z,a)
Func(x,a,mad=7,any=vlength(P1,P2))
- possible: Func(7,9,10,12), Func(x,y,z), Func(x,sin(y))
- impossible: Func, Func(x)
In both, new and old syntax, I plan add support for locals:
Func=function{
local a=expression;
local b=expression;
a+b-sin(a)
}
Perhaps, if it will be possible I will add
- recursion: Func=function(a,b){a+b+Func(a+1,b-1)}
- registration to use function also during parsing
any comments ?
>Christopher James Huff
thanks for help
ABX
Post a reply to this message
|
![](/i/fill.gif) |